package com.woniu.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 
 * @TableName direct_order_details
 */
@TableName(value ="direct_order_details")
@Data
public class DirectOrderDetails implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 订单编号
     */
    private String orderNumber;

    /**
     * 物料型号
     */
    private String model;

    /**
     * 客户物料编号
     */
    private String customerMaterialNum;

    /**
     * 产品类型
     */
    private String productType;

    /**
     * 仓库
     */
    private String warehouse;

    /**
     * 是否进口产品
     */
    private String isImported;

    /**
     * 订购单位
     */
    private String orderUnit;

    /**
     * 订购数量
     */
    private Long orderQuantity;

    /**
     * 列表价格
     */
    private BigDecimal listPrice;

    /**
     * 价格
     */
    private BigDecimal price;

    /**
     * 折扣百分比
     */
    private BigDecimal discountPercentage;

    /**
     * 成交价格
     */
    private BigDecimal dealPrice;

    /**
     * 税额
     */
    private BigDecimal taxAmount;

    /**
     * 总金额
     */
    private BigDecimal totalAmount;

    /**
     * 定金
     */
    private BigDecimal deposit;

    /**
     * 客户订单编号
     */
    private String customerOrderNumber;

    /**
     * 库存物料状态
     */
    private String inventoryMaterialStatus;

    /**
     * 当前库存
     */
    private Long currentInventory;

    /**
     * 已分配库存
     */
    private Long allocatedInventory;

    /**
     * 预计发货日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date estimatedShipDate;

    /**
     * 预计装运日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date expectedShipDate;

    /**
     * 预计交货日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date expectedDeliveryDate;

    /**
     * BOM虚拟或实际
     */
    private String bomVirtualOrActual;

    /**
     * 物料类型
     */
    private String materialType;

    /**
     * 是否特别优惠
     */
    private String isSpecialOffer;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DirectOrderDetails other = (DirectOrderDetails) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOrderNumber() == null ? other.getOrderNumber() == null : this.getOrderNumber().equals(other.getOrderNumber()))
            && (this.getModel() == null ? other.getModel() == null : this.getModel().equals(other.getModel()))
            && (this.getCustomerMaterialNum() == null ? other.getCustomerMaterialNum() == null : this.getCustomerMaterialNum().equals(other.getCustomerMaterialNum()))
            && (this.getProductType() == null ? other.getProductType() == null : this.getProductType().equals(other.getProductType()))
            && (this.getWarehouse() == null ? other.getWarehouse() == null : this.getWarehouse().equals(other.getWarehouse()))
            && (this.getIsImported() == null ? other.getIsImported() == null : this.getIsImported().equals(other.getIsImported()))
            && (this.getOrderUnit() == null ? other.getOrderUnit() == null : this.getOrderUnit().equals(other.getOrderUnit()))
            && (this.getOrderQuantity() == null ? other.getOrderQuantity() == null : this.getOrderQuantity().equals(other.getOrderQuantity()))
            && (this.getListPrice() == null ? other.getListPrice() == null : this.getListPrice().equals(other.getListPrice()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getDiscountPercentage() == null ? other.getDiscountPercentage() == null : this.getDiscountPercentage().equals(other.getDiscountPercentage()))
            && (this.getDealPrice() == null ? other.getDealPrice() == null : this.getDealPrice().equals(other.getDealPrice()))
            && (this.getTaxAmount() == null ? other.getTaxAmount() == null : this.getTaxAmount().equals(other.getTaxAmount()))
            && (this.getTotalAmount() == null ? other.getTotalAmount() == null : this.getTotalAmount().equals(other.getTotalAmount()))
            && (this.getDeposit() == null ? other.getDeposit() == null : this.getDeposit().equals(other.getDeposit()))
            && (this.getCustomerOrderNumber() == null ? other.getCustomerOrderNumber() == null : this.getCustomerOrderNumber().equals(other.getCustomerOrderNumber()))
            && (this.getInventoryMaterialStatus() == null ? other.getInventoryMaterialStatus() == null : this.getInventoryMaterialStatus().equals(other.getInventoryMaterialStatus()))
            && (this.getCurrentInventory() == null ? other.getCurrentInventory() == null : this.getCurrentInventory().equals(other.getCurrentInventory()))
            && (this.getAllocatedInventory() == null ? other.getAllocatedInventory() == null : this.getAllocatedInventory().equals(other.getAllocatedInventory()))
            && (this.getEstimatedShipDate() == null ? other.getEstimatedShipDate() == null : this.getEstimatedShipDate().equals(other.getEstimatedShipDate()))
            && (this.getExpectedShipDate() == null ? other.getExpectedShipDate() == null : this.getExpectedShipDate().equals(other.getExpectedShipDate()))
            && (this.getExpectedDeliveryDate() == null ? other.getExpectedDeliveryDate() == null : this.getExpectedDeliveryDate().equals(other.getExpectedDeliveryDate()))
            && (this.getBomVirtualOrActual() == null ? other.getBomVirtualOrActual() == null : this.getBomVirtualOrActual().equals(other.getBomVirtualOrActual()))
            && (this.getMaterialType() == null ? other.getMaterialType() == null : this.getMaterialType().equals(other.getMaterialType()))
            && (this.getIsSpecialOffer() == null ? other.getIsSpecialOffer() == null : this.getIsSpecialOffer().equals(other.getIsSpecialOffer()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOrderNumber() == null) ? 0 : getOrderNumber().hashCode());
        result = prime * result + ((getModel() == null) ? 0 : getModel().hashCode());
        result = prime * result + ((getCustomerMaterialNum() == null) ? 0 : getCustomerMaterialNum().hashCode());
        result = prime * result + ((getProductType() == null) ? 0 : getProductType().hashCode());
        result = prime * result + ((getWarehouse() == null) ? 0 : getWarehouse().hashCode());
        result = prime * result + ((getIsImported() == null) ? 0 : getIsImported().hashCode());
        result = prime * result + ((getOrderUnit() == null) ? 0 : getOrderUnit().hashCode());
        result = prime * result + ((getOrderQuantity() == null) ? 0 : getOrderQuantity().hashCode());
        result = prime * result + ((getListPrice() == null) ? 0 : getListPrice().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getDiscountPercentage() == null) ? 0 : getDiscountPercentage().hashCode());
        result = prime * result + ((getDealPrice() == null) ? 0 : getDealPrice().hashCode());
        result = prime * result + ((getTaxAmount() == null) ? 0 : getTaxAmount().hashCode());
        result = prime * result + ((getTotalAmount() == null) ? 0 : getTotalAmount().hashCode());
        result = prime * result + ((getDeposit() == null) ? 0 : getDeposit().hashCode());
        result = prime * result + ((getCustomerOrderNumber() == null) ? 0 : getCustomerOrderNumber().hashCode());
        result = prime * result + ((getInventoryMaterialStatus() == null) ? 0 : getInventoryMaterialStatus().hashCode());
        result = prime * result + ((getCurrentInventory() == null) ? 0 : getCurrentInventory().hashCode());
        result = prime * result + ((getAllocatedInventory() == null) ? 0 : getAllocatedInventory().hashCode());
        result = prime * result + ((getEstimatedShipDate() == null) ? 0 : getEstimatedShipDate().hashCode());
        result = prime * result + ((getExpectedShipDate() == null) ? 0 : getExpectedShipDate().hashCode());
        result = prime * result + ((getExpectedDeliveryDate() == null) ? 0 : getExpectedDeliveryDate().hashCode());
        result = prime * result + ((getBomVirtualOrActual() == null) ? 0 : getBomVirtualOrActual().hashCode());
        result = prime * result + ((getMaterialType() == null) ? 0 : getMaterialType().hashCode());
        result = prime * result + ((getIsSpecialOffer() == null) ? 0 : getIsSpecialOffer().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", orderNumber=").append(orderNumber);
        sb.append(", model=").append(model);
        sb.append(", customerMaterialNum=").append(customerMaterialNum);
        sb.append(", productType=").append(productType);
        sb.append(", warehouse=").append(warehouse);
        sb.append(", isImported=").append(isImported);
        sb.append(", orderUnit=").append(orderUnit);
        sb.append(", orderQuantity=").append(orderQuantity);
        sb.append(", listPrice=").append(listPrice);
        sb.append(", price=").append(price);
        sb.append(", discountPercentage=").append(discountPercentage);
        sb.append(", dealPrice=").append(dealPrice);
        sb.append(", taxAmount=").append(taxAmount);
        sb.append(", totalAmount=").append(totalAmount);
        sb.append(", deposit=").append(deposit);
        sb.append(", customerOrderNumber=").append(customerOrderNumber);
        sb.append(", inventoryMaterialStatus=").append(inventoryMaterialStatus);
        sb.append(", currentInventory=").append(currentInventory);
        sb.append(", allocatedInventory=").append(allocatedInventory);
        sb.append(", estimatedShipDate=").append(estimatedShipDate);
        sb.append(", expectedShipDate=").append(expectedShipDate);
        sb.append(", expectedDeliveryDate=").append(expectedDeliveryDate);
        sb.append(", bomVirtualOrActual=").append(bomVirtualOrActual);
        sb.append(", materialType=").append(materialType);
        sb.append(", isSpecialOffer=").append(isSpecialOffer);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}